
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module apiclient.oauth</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="apiclient.html"><font color="#ffffff">apiclient</font></a>.oauth</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/google-api-python-client/apiclient/oauth.py">/home/jcgregorio/projects/google-api-python-client/apiclient/oauth.py</a></font></td></tr></table>
    <p><tt>Utilities&nbsp;for&nbsp;OAuth.<br>
&nbsp;<br>
Utilities&nbsp;for&nbsp;making&nbsp;it&nbsp;easier&nbsp;to&nbsp;work&nbsp;with&nbsp;OAuth.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br>
<a href="httplib2.html">httplib2</a><br>
</td><td width="25%" valign=top><a href="logging.html">logging</a><br>
<a href="oauth2.html">oauth2</a><br>
</td><td width="25%" valign=top><a href="simplejson.html">simplejson</a><br>
<a href="urllib.html">urllib</a><br>
</td><td width="25%" valign=top><a href="urlparse.html">urlparse</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Credentials">Credentials</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#OAuthCredentials">OAuthCredentials</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Flow">Flow</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Storage">Storage</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Error">Error</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#CredentialsInvalidError">CredentialsInvalidError</a>
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a>
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#RequestError">RequestError</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Credentials">class <strong>Credentials</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Credentials">Credentials</a>&nbsp;objects.<br>
&nbsp;<br>
Subclasses&nbsp;must&nbsp;define&nbsp;an&nbsp;<a href="#Credentials-authorize">authorize</a>()&nbsp;method<br>
that&nbsp;applies&nbsp;the&nbsp;credentials&nbsp;to&nbsp;an&nbsp;HTTP&nbsp;transport.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Take&nbsp;an&nbsp;httplib2.Http&nbsp;instance&nbsp;(or&nbsp;equivalent)&nbsp;and<br>
authorizes&nbsp;it&nbsp;for&nbsp;the&nbsp;set&nbsp;of&nbsp;credentials,&nbsp;usually&nbsp;by<br>
replacing&nbsp;http.request()&nbsp;with&nbsp;a&nbsp;method&nbsp;that&nbsp;adds&nbsp;in<br>
the&nbsp;appropriate&nbsp;headers&nbsp;and&nbsp;then&nbsp;delegates&nbsp;to&nbsp;the&nbsp;original<br>
Http.request()&nbsp;method.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="CredentialsInvalidError">class <strong>CredentialsInvalidError</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.oauth.html#CredentialsInvalidError">CredentialsInvalidError</a></dd>
<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="CredentialsInvalidError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#CredentialsInvalidError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="CredentialsInvalidError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="CredentialsInvalidError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="CredentialsInvalidError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="CredentialsInvalidError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;error&nbsp;for&nbsp;this&nbsp;module.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Flow">class <strong>Flow</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Flow">Flow</a>&nbsp;objects.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FlowThreeLegged">class <strong>FlowThreeLegged</strong></a>(<a href="apiclient.oauth.html#Flow">Flow</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Does&nbsp;the&nbsp;Three&nbsp;Legged&nbsp;Dance&nbsp;for&nbsp;OAuth&nbsp;1.0a.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a></dd>
<dd><a href="apiclient.oauth.html#Flow">Flow</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="FlowThreeLegged-__init__"><strong>__init__</strong></a>(self, discovery, consumer_key, consumer_secret, user_agent, **kwargs)</dt><dd><tt>discovery&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Section&nbsp;of&nbsp;the&nbsp;API&nbsp;discovery&nbsp;document&nbsp;that&nbsp;describes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;OAuth&nbsp;endpoints.<br>
consumer_key&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;OAuth&nbsp;consumer&nbsp;key<br>
consumer_secret&nbsp;-&nbsp;OAuth&nbsp;consumer&nbsp;secret<br>
user_agent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;HTTP&nbsp;User-Agent&nbsp;that&nbsp;identifies&nbsp;the&nbsp;application.<br>
**kwargs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;keyword&nbsp;arguments&nbsp;are&nbsp;all&nbsp;optional&nbsp;and&nbsp;required<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters&nbsp;for&nbsp;the&nbsp;OAuth&nbsp;calls.</tt></dd></dl>

<dl><dt><a name="FlowThreeLegged-step1_get_authorize_url"><strong>step1_get_authorize_url</strong></a>(self, oauth_callback<font color="#909090">='oob'</font>)</dt><dd><tt>Returns&nbsp;a&nbsp;URI&nbsp;to&nbsp;redirect&nbsp;to&nbsp;the&nbsp;provider.<br>
&nbsp;<br>
oauth_callback&nbsp;-&nbsp;Either&nbsp;the&nbsp;string&nbsp;'oob'&nbsp;for&nbsp;a&nbsp;non-web-based&nbsp;application,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;a&nbsp;URI&nbsp;that&nbsp;handles&nbsp;the&nbsp;callback&nbsp;from&nbsp;the&nbsp;authorization<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server.<br>
&nbsp;<br>
If&nbsp;oauth_callback&nbsp;is&nbsp;'oob'&nbsp;then&nbsp;pass&nbsp;in&nbsp;the<br>
generated&nbsp;verification&nbsp;code&nbsp;to&nbsp;step2_exchange,<br>
otherwise&nbsp;pass&nbsp;in&nbsp;the&nbsp;query&nbsp;parameters&nbsp;received<br>
at&nbsp;the&nbsp;callback&nbsp;uri&nbsp;to&nbsp;step2_exchange.</tt></dd></dl>

<dl><dt><a name="FlowThreeLegged-step2_exchange"><strong>step2_exchange</strong></a>(self, verifier)</dt><dd><tt>Exhanges&nbsp;an&nbsp;authorized&nbsp;request&nbsp;token<br>
for&nbsp;<a href="#OAuthCredentials">OAuthCredentials</a>.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;verifier:&nbsp;string,&nbsp;dict&nbsp;-&nbsp;either&nbsp;the&nbsp;verifier&nbsp;token,&nbsp;or&nbsp;a&nbsp;dictionary<br>
&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;the&nbsp;query&nbsp;parameters&nbsp;to&nbsp;the&nbsp;callback,&nbsp;which&nbsp;contains<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;oauth_verifier.<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;The&nbsp;<a href="#Credentials">Credentials</a>&nbsp;<a href="__builtin__.html#object">object</a>.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="apiclient.oauth.html#Flow">Flow</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MissingParameter">class <strong>MissingParameter</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a></dd>
<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="MissingParameter-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#MissingParameter-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="MissingParameter-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="MissingParameter-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="MissingParameter-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="MissingParameter-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="MissingParameter-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="MissingParameter-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="MissingParameter-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="MissingParameter-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="MissingParameter-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="MissingParameter-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="OAuthCredentials">class <strong>OAuthCredentials</strong></a>(<a href="apiclient.oauth.html#Credentials">Credentials</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Credentials">Credentials</a>&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;for&nbsp;OAuth&nbsp;1.0a<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.oauth.html#OAuthCredentials">OAuthCredentials</a></dd>
<dd><a href="apiclient.oauth.html#Credentials">Credentials</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="OAuthCredentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim&nbsp;the&nbsp;state&nbsp;down&nbsp;to&nbsp;something&nbsp;that&nbsp;can&nbsp;be&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="OAuthCredentials-__init__"><strong>__init__</strong></a>(self, consumer, token, user_agent)</dt><dd><tt>consumer&nbsp;&nbsp;&nbsp;-&nbsp;An&nbsp;instance&nbsp;of&nbsp;oauth.Consumer.<br>
token&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;An&nbsp;instance&nbsp;of&nbsp;oauth.Token&nbsp;constructed&nbsp;with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;access&nbsp;token&nbsp;and&nbsp;secret.<br>
user_agent&nbsp;-&nbsp;The&nbsp;HTTP&nbsp;User-Agent&nbsp;to&nbsp;provide&nbsp;for&nbsp;this&nbsp;application.</tt></dd></dl>

<dl><dt><a name="OAuthCredentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute&nbsp;the&nbsp;state&nbsp;of&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;from&nbsp;being&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="OAuthCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Args:<br>
&nbsp;&nbsp;&nbsp;http&nbsp;-&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;something&nbsp;that&nbsp;acts&nbsp;like&nbsp;it.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;A&nbsp;modified&nbsp;instance&nbsp;of&nbsp;http&nbsp;that&nbsp;was&nbsp;passed&nbsp;in.<br>
&nbsp;<br>
Example:<br>
&nbsp;<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;httplib2.Http()<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;credentials.<a href="#OAuthCredentials-authorize">authorize</a>(h)<br>
&nbsp;<br>
You&nbsp;can't&nbsp;create&nbsp;a&nbsp;new&nbsp;OAuth<br>
subclass&nbsp;of&nbsp;httplib2.Authenication&nbsp;because<br>
it&nbsp;never&nbsp;gets&nbsp;passed&nbsp;the&nbsp;absolute&nbsp;URI,&nbsp;which&nbsp;is<br>
needed&nbsp;for&nbsp;signing.&nbsp;So&nbsp;instead&nbsp;we&nbsp;have&nbsp;to&nbsp;overload<br>
'request'&nbsp;with&nbsp;a&nbsp;closure&nbsp;that&nbsp;adds&nbsp;in&nbsp;the<br>
Authorization&nbsp;header&nbsp;and&nbsp;then&nbsp;calls&nbsp;the&nbsp;original&nbsp;version<br>
of&nbsp;'request()'.</tt></dd></dl>

<dl><dt><a name="OAuthCredentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set&nbsp;the&nbsp;storage&nbsp;for&nbsp;the&nbsp;credential.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;store:&nbsp;callable,&nbsp;a&nbsp;callable&nbsp;that&nbsp;when&nbsp;passed&nbsp;a&nbsp;Credential<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;store&nbsp;the&nbsp;credential&nbsp;back&nbsp;to&nbsp;where&nbsp;it&nbsp;came&nbsp;from.<br>
&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;needed&nbsp;to&nbsp;store&nbsp;the&nbsp;latest&nbsp;access_token&nbsp;if&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;been&nbsp;revoked.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>invalid</strong></dt>
<dd><tt>True&nbsp;if&nbsp;the&nbsp;credentials&nbsp;are&nbsp;invalid,&nbsp;such&nbsp;as&nbsp;being&nbsp;revoked.</tt></dd>
</dl>
<hr>
Data descriptors inherited from <a href="apiclient.oauth.html#Credentials">Credentials</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="RequestError">class <strong>RequestError</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Error">Error</a>&nbsp;occurred&nbsp;during&nbsp;request.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.oauth.html#RequestError">RequestError</a></dd>
<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="RequestError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#RequestError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="RequestError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="RequestError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="RequestError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="RequestError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="RequestError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="RequestError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="RequestError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="RequestError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="RequestError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="RequestError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Storage">class <strong>Storage</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Storage">Storage</a>&nbsp;objects.<br>
&nbsp;<br>
Store&nbsp;and&nbsp;retrieve&nbsp;a&nbsp;single&nbsp;credential.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Storage-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve&nbsp;credential.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;apiclient.oauth.<a href="#Credentials">Credentials</a></tt></dd></dl>

<dl><dt><a name="Storage-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write&nbsp;a&nbsp;credential.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;credentials:&nbsp;<a href="#Credentials">Credentials</a>,&nbsp;the&nbsp;credentials&nbsp;to&nbsp;store.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">jcgregorio@google.com&nbsp;(Joe&nbsp;Gregorio)</td></tr></table>
</body></html>